#ifndef WOLF_STD_TEST_HPP
#define WOLF_STD_TEST_HPP

#include "test.hpp"
#include <SDL_ttf.h>

namespace wolf
{
    //    typedef void (*funcpoint)(int, int);
    /**
     * @brief A default test, who creates a engine and loads a font;
     *
     * Then call run(engine), that is definded on subclasses
     *
     **/
    class StdTest : public Test
    {
    public:
        TTF_Font *_font; ///< A font
        /**
         * @brief Creates a new engine std test
         *
         *
         **/
        StdTest( const char *name ) : Test( name )
        {
            _font = TTF_OpenFont( "resource/larabieb.ttf", 20 );
        }
        virtual ~StdTest()
        {
            TTF_CloseFont( _font );
        }

        bool run()
        {
            Engine engine( Engine::DEBUG );
            engine.setVideoMode( 640, 480, 0 );
            engine.setFrameRate( 30 );

            //Starting the engine
            engine.start();

            bool returnValue = run( engine );

            engine.halt();
            return returnValue;
        }

        virtual bool run( Engine &engine ) = 0;

    };

}

#endif // WOLF_STD_TEST_HPP


